<?php

namespace App\Jobs;

use App\Jobs\Job;
use App\Services\SendSms;
use Illuminate\Contracts\Bus\SelfHandling;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class MassMessage extends Job implements SelfHandling
{
    use InteractsWithQueue,SerializesModels;


    public function __construct($phone,$command,$templateId,$signature)
    {
        $this->phone = $phone;
        $this->command = $command;

    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle(SendSms $sendSms)
    {
        $result = $sendSms->massMsg($this->phone, $this->command, $templateId='', $signature='');
        //$result = $sendSms->sendMsg($this->phone, $this->command, $templateId='', $signature='');
        //$this->comment('SOLR数据同步请求发送状态:');
        return $result;

    }
}
